package com.learn.sqlsession;

import java.sql.SQLException;
import java.util.List;

public interface SqlSession {
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    <T> T selectOne(String statementId, Object... params) throws Exception;

    void close() throws SQLException;

    /**
     * 给使用端的Dao层接口 生成动态代理实现类对象
     *
     * @param mapperClass
     * @param <T>
     * @return
     */
    <T> T getMapper(Class<?> mapperClass);
}
